package com.java.second_goods.entity.bo;

import com.java.second_goods.entity.Booking;
import lombok.Data;

@Data
public class BookingRequestDTO {
    private String contact_name;
    private String contact_phone;
    private Integer goods_id;
    private Integer user_id;


    public Booking toBooking() {
        Booking booking = new Booking();
        booking.setContactName(this.contact_name);
        booking.setContactPhone(this.contact_phone);
        booking.setGoodsId(this.goods_id);
        booking.setUserId(this.user_id);
        return booking;
    }
}